import pickle

prime = range(350000001, 500000000, 2)

F = open('primekid.txt', 'r')
primesmall = pickle.load(F)
F.close()

l = len(prime)
flag = 0

while primesmall[flag] ** 2 < 500000000:
#     print l,primesmall[flag]            
    prime = filter(lambda x:(x % primesmall[flag]) <> 0 or x == primesmall[flag], prime)
    l = len(prime)
    flag += 1

prime.sort()
F = open('prime200.txt', 'w')
pickle.dump(prime, F)
F.close()
